clear;
clc;
x=linspace(0,3*pi/2,500);
y=cos(15*x);
plot(x,y)
disp('-----------------------')

syms x,
A=int(cos(15*x),0,3*pi/2);
h0=10.^[-1:-1:-6];
for h=h0,tic
    x=[0:h:3*pi/2,3*pi/2];
    y=cos(15*x);
    I=trapz(x,y);
    toc,
end